Link to this headingRust
Link to this headingClippy
Install Rust:
|
Install Clippy:
Check for vuln libriries:
Check Rust Code:
#TOFINISH
Link to this headingGetting Rust to use SSH
Update Cargo Config:
>>> cat
Update Git Config:
>>> cat
Link to this headingString Issues
Link to this headingUTF-8 String Handling
The String type is a growable, mutable, owned, and UTF-8 encoded string. For this section, we’ll focus on String and &str.
Caution with Slicing:
//Avoid direct slicing of multi-byte characters
let hello = "Здравствуйте";
let s = &hello; // Panics at runtime!
Safe methods:
Link to this headingSQL Injection
Avoid vulnerable code:
format!
Use parameterized queries with the sql crate:
use Connection;
let query = "SELECT * FROM users WHERE username = $1";
let rows = connection.query.unwrap;